 .--------------------------------------------------.
 
          .-.                   .  .---..   .
         (   )                 _|_ |     \ / 
          `-..  .    ._.-.  .-. |  |---   /  
         (   )\  \  / (.-' (.-' |  |     / \ 
          `-'  `' `'   `--' `--'`-''    '   '
                    Shader Suite
                    by CeeJay.dk                    
 '--------------------------------------------------'
 
 - Version 1.1.1

SweetFX is a universal image improvement and tweaking mod,
that works with almost any DirectX game or application.

It merges 3 such mods - InjectSMAA, FXAATool and my own LumaSharpen into one.
This allows all of the effects to be used with combination with each other.

Effects included:

* SMAA (anti-aliases the image using the SMAA technique - see http://www.iryoku.com/smaa/ )
* LumaSharpen (Sharpens the image, making details easier to see)
* Bloom (Makes strong lights bleed their light into their surroundings)
* HDR (mimics an HDR look)
* Technicolor (Makes the image look like it was processed using a three-strip Technicolor process - see http://en.wikipedia.org/wiki/Technicolor )
* Tonemap (Light and color adjustments)
* Vibrance (Intelligently saturates (or desaturates if you use negative values) the pixels depending on their original saturation)
* Sepia (Sepia tones the image - see http://en.wikipedia.org/wiki/Sepia_tone#Sepia_toning )
* Vignette (Adds a vignette that darkens the borders to the image - see http://en.wikipedia.org/wiki/Vignetting )
* Dither (Dithers the image making it look like it was displayed on a monitor with more colors than actually present - see http://en.wikipedia.org/wiki/Dithering#Digital_photography_and_image_processing )


   /*-----------------------------------------------------------.   
  /                      Installation                           /
  '-----------------------------------------------------------*/

1) Copy all files into the directory of a game exe.

The installed files are:
   d3d9.dll               - DirectX 9 proxy dll that will inject shaders into DirectX 9 games
   d3d9.fx                - DirectX 9 specific shader code
   dxgi.dll               - DirectX 10/11 proxy dll that will inject shaders into DirectX 10/11 games
   dxgi.fx                - DirectX 10/11 specific shader code
   injector.ini           - Settings for the shader injector dlls - you can reconfigure the keys used in this file
   SweetFX readme.txt     - This readme
   SweetFX_preset.txt     - You can choose which settings file to load here - default is to load SweetFX_settings.txt
   SweetFX_settings.txt   - SweetFX settings. Effects can be turned on and off here, and their settings can be tweaked.
   
   SweetFX/ (directory)   - The SweetFX subdirectory. All the shaders, except d3d9.fx and dxgi.fx are stored here.

   log.log                - This logfile is not installed, but will be created when the DirectX proxy dll runs.
                            If something goes wrong, this file will usually tell you why.
                            
2) Install the latest DirectX update if you haven't already
   Last I looked it was here : http://www.microsoft.com/en-us/download/details.aspx?id=35
   (You don't need any of the other stuff Microsoft tries to push - just DirectX)                            


   /*-----------------------------------------------------------.   
  /                          Usage                              /
  '-----------------------------------------------------------*/
  
It will automatically run when you start the DirectX 9, 10 or 11 game that you added SweetFX to.
If you want to run different game with SweetFX then you need to install to that games directory too.

It does not modify any game files either on disk or in memory.
Instead it uses a custom Direct3D runtime dll which the most DirectX games will call.

PRINTSCRN saves a screenshot named ScreenshotXXXX.bmp in the directory you installed SweetFX to.
SCROLL_LOCK switches it ON and OFF. It starts in ON mode.
PAUSE reloads the shader files (this is useful when you need to tweak the settings while the game is running)

Keys can be reconfigured in the injector.ini file.

   /*-----------------------------------------------------------.   
  /                      Tweaking settings                      /
  '-----------------------------------------------------------*/

You can choose which effects to enable, and set their parameters
in the SweetFX_settings.txt file - this can even be done while the game is running.

1) Switch away from your game with ALT+TAB or WIN+TAB
2) Open SweetFX_settings.txt in any text editor - fx. : Notepad (I use Notepad2)
3) Edit the settings and save.
4) Switch back to your game with ALT+TAB or WIN+TAB
5) If the game is running in fullscreen mode then it will now have reloaded the shader files
   and your new settings have been applied.
   If the game is running in Windowed mode then you need to press the PAUSE key to reload the shader files
   and apply your new settings.
   
And naturally you don't have to start the game before you edit your settings.
It can be done before the game runs as well.   

   /*-----------------------------------------------------------.   
  /                         Problems?                           /
  '-----------------------------------------------------------*/

When the mod starts it creates a log.log file next to it's own location.
Open the log with a text editor and see what the problem is.

If no log file is created then the mod did not start.
- Maybe you didn't put the files in the right location?
- Or maybe the game doesn't use DirectX?

Most games use DirectX 9, 10 or 11.
Notable games that use OpenGL (which SweetFX doesn't work with) are all games by id software,
and those games based on their 3D engines.


Q: It says d3dx9_43.dll is missing
A: You need the latest DirectX 9 update.
   See step 2) of the installation section.


Q: I don't see any change in the image
A: Try turning off anti-aliasing in the game (not in the mod)
   The mod is not compatible with some antialias implementations.
   It might be made compatible by setting compability flags.
   
   If not then you can always use the included SMAA anti-aliasing.

   
Q: How do I make MSI Afterburner work with this mod?
A: To make MSI Afterburner work with this mod and others like it you need to :

1) Update to the latest version of MSI Afterburner.
2) Start MSI Afterburner.
3) Switch to the "MSI On-Screen Display Server" window.
4) Create a new profile for your game and change to it.
5) Click the big wrench icon to change advanced settings.
6) Go to General -> Compatibility properties and turn on "Enable compatibility with modified Direct3D runtime libraries".

MSI Afterburner is now compatible with shader mods.

You can also change the setting for the Global profile,
but MSI does not recommend this because it might prevent some Direct3D applications from starting.


Q: How do I use SweetFX with ENBseries?
A: By making ENB run SweetFX. You need to: 

1) Rename d3d9.dll to sweetfx_d3d9.dll
2) Install the ENB series files into the same directory
3) Edit enbseries.ini so the top section looks like this:

[PROXY]
EnableProxyLibrary=true
InitProxyFunctions=true
ProxyLibrary=sweetfx_d3d9.dll

That should do it.

Q: How do I use SweetFX with OpenGL games?
A: SweetFX only supports DirectX 9 , 10 and 11 games, however you can use a OpenGL to DirectX wrapper.

Try the QindieGL wrapper : http://code.google.com/p/qindie-gl/
It can translate OpenGL calls to DirectX 9 calls that SweetFX will work with.
It does not work with all OpenGL games and some games it does work with will have buggy graphics
and it will likely run slower since it's being translated, but if you want to try out SweetFX with OpenGL games this is probably your best bet.
I haven't tried it myself yet so let me know if it works or not.

Q: How do I use SweetFX with DirectX 8 games?
A: SweetFX only supports DirectX 9 , 10 and 11 games, however you can use a DirectX 8 to DirectX 9 wrapper.

Try the DX8 to DX9 convertor from ENBseries : http://enbdev.com/download_en.htm
Let me know if it works for you.

Q: How do I use SweetFX with games that use DirectX 7 or older or even Glide?
A: Again you need to find a wrapper that will translate the API that the game uses to one that SweetFX supports.


   /*-----------------------------------------------------------.   
  /                     Uninstallation                          /
  '-----------------------------------------------------------*/

1) Delete all the files you copied during the installation.


   /*-----------------------------------------------------------.   
  /                          Credits                            /
  '-----------------------------------------------------------*/

 Uses SMAA. Copyright (C) 2011 by Jorge Jimenez, Jose I. Echevarria,
 Belen Masia, Fernando Navarro and Diego Gutierrez.
 
 Uses InjectSMAA by Andrej Dudenhefner ( mrhaandi )
 
 Uses shaders from FXAATool by Violator, [some dude], fpedace, BeetleatWar1977 and [DKT70]
 
 SweetFX and LumaSharpen by Christian Cann Schuldt Jensen ( CeeJay.dk )
 
   /*-----------------------------------------------------------.   
  /                          Contact                            /
  '-----------------------------------------------------------*/

 Email your comments and suggestions to :
     CeeJay.dk (at) gmail.com